Thực đơn
Kiểu trừu tượng Định nghĩa các loại trừu tượngLớp trừu tượng có thể được tạo ra, định nghĩa, hay mô phỏng, theo nhiều cách:
- [NSObject doesNotRecognizeSelector:(SEL)selector]
được gọi khi phát hiện phương thức chưa được hiện thực).//By default, all methods in all classes are concrete, unless the abstract keyword is used.abstract class Demo { // An abstract class may include abstract methods, which have no implementation. abstract public int sum(int x, int y); // An abstract class may also include concrete methods. public int product(int x, int y) { return x*y; }}//By default, all methods in all interfaces are abstract, unless the default keyword is used.interface DemoInterface { [abstract] int getLength(); //Abstract can be used here, though is completely useless //The default keyword can be used in this context to specify a concrete method in an interface default int product(int x, int y) { return x * y; }}
Thực đơn
Kiểu trừu tượng Định nghĩa các loại trừu tượngLiên quan
Kiểu tóc Kiểu và khai báo biến trong C Kiểu chào Quốc xã Kiểu phương tiện Kiểu mạnh và kiểu yếu Kiểu dữ liệu Kiểu dữ liệu Boolean Kiểu dữ liệu mảng Kiểu nhân đồ Kiểu dáng công nghiệpTài liệu tham khảo
WikiPedia: Kiểu trừu tượng http://www.headfirstlabs.com/books/hfjava/ http://10kloc.wordpress.com/2012/12/03/abstract-in... http://theory.stanford.edu/~jcm/papers/mitch-plotk... http://www.cis.upenn.edu/~bcpierce/tapl/main.html http://rosettacode.org/wiki/Abstract_type